projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a928ea6
)
gtk-demo: Add an "Unsorted" option (and default to it)
author
Benjamin Otte
<otte@redhat.com>
Sun, 21 Jun 2020 04:54:21 +0000
(06:54 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Sun, 21 Jun 2020 12:17:47 +0000
(14:17 +0200)
Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).
demos/gtk-demo/listview_colors.c
patch
|
blob
|
history
diff --git
a/demos/gtk-demo/listview_colors.c
b/demos/gtk-demo/listview_colors.c
index 7441b3249ac19e44d479d6674b185aec42a0ffe9..9e6acab411106d4acd6c83b58b8c8c8d10137e44 100644
(file)
--- a/
demos/gtk-demo/listview_colors.c
+++ b/
demos/gtk-demo/listview_colors.c
@@
-792,6
+792,14
@@
do_listview_colors (GtkWidget *do_widget)
sorters = g_list_store_new (GTK_TYPE_SORTER);
+ /* An empty multisorter doesn't do any sorting and the sortmodel is
+ * smart enough to know that.
+ */
+ sorter = gtk_multi_sorter_new ();
+ set_title (sorter, "Unsorted");
+ g_list_store_append (sorters, sorter);
+ g_object_unref (sorter);
+
sorter = gtk_string_sorter_new (gtk_property_expression_new (GTK_TYPE_COLOR, NULL, "name"));
set_title (sorter, "Name");
g_list_store_append (sorters, sorter);